<html>
<head>
	<title>Serialization benchmark results</title>
	<link href='default.css' rel='stylesheet' type='text/css' />
</head>
<body>

<h2>Results of <span>Northwind database tables serialization</span> benchmarks run at 06/02/2010</h2>
<span class="summary">These benchmarks show the total time in ticks (1/1000ms) that it takes each serializer to serialize and deserialize each entire table from the  <a href='http://code.google.com/p/servicestack/source/browse/trunk/Common/Northwind.Benchmarks/Northwind.Common/DataModel/NorthwindData.cs'>Northwind Database</a> (3202 records) <strong>10,000</strong> Times. <br/><br/>The full source code of the serialization benchmarks (which generated this report) is <a href='http://code.google.com/p/servicestack/source/browse/trunk/Common/Northwind.Benchmarks/Northwind.Benchmarks.Console/Program.cs'>available here</a>.</span><div id='combined'>
<h3>Combined results of all benchmarks below</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>460508</td><th>4.08x</th><td>250360107</td><td>725907447</td><td>976267554</td><td>97626.7554</td><th>5.36x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>344645</td><th>3.06x</th><td>545812784</td><td>1593649902</td><td>2139462686</td><td>213946.2686</td><th>11.74x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>118407</td><th>1.05x</th><td>626634288</td><td>286451282</td><td>913085570</td><td>91308.557</td><th>5.01x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>346173</td><th>3.07x</th><td>561658934</td><td>1397715530</td><td>1959374464</td><td>195937.4464</td><th>10.75x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>112762</td><th>1x</th><td>82312572</td><td>99979147</td><td>182291719</td><td>18229.1719</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>247146</td><th>2.19x</th><td>269362699</td><td>261483596</td><td>530846295</td><td>53084.6295</td><th>2.91x</th></tr>
</tbody>
</table>
</div>
<h3>Results of serializing and deserializing CategoryDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>1232</td><th>3.23x</th><td>564001</td><td>1361413</td><td>1925414</td><td>192.5414</td><th>3.72x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>672</td><th>1.76x</th><td>804964</td><td>2522594</td><td>3327558</td><td>332.7558</td><th>6.43x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>1127</td><th>2.96x</th><td>1904171</td><td>1829773</td><td>3733944</td><td>373.3944</td><th>7.22x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>790</td><th>2.07x</th><td>946159</td><td>2827211</td><td>3773370</td><td>377.337</td><th>7.29x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>381</td><th>1x</th><td>276223</td><td>241239</td><td>517462</td><td>51.7462</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>598</td><th>1.57x</th><td>344250</td><td>416011</td><td>760261</td><td>76.0261</td><th>1.47x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing CustomerDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>32721</td><th>2.62x</th><td>14693654</td><td>53733195</td><td>68426849</td><td>6842.6849</td><th>3.67x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>23869</td><th>1.91x</th><td>15532970</td><td>83340568</td><td>98873538</td><td>9887.3538</td><th>5.31x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>16132</td><th>1.29x</th><td>32156077</td><td>26687326</td><td>58843403</td><td>5884.3403</td><th>3.16x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>25229</td><th>2.02x</th><td>22294177</td><td>58504510</td><td>80798687</td><td>8079.8687</td><th>4.34x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>12492</td><th>1x</th><td>8922730</td><td>9705162</td><td>18627892</td><td>1862.7892</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>19140</td><th>1.53x</th><td>9783867</td><td>14389981</td><td>24173848</td><td>2417.3848</td><th>1.30x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing EmployeeDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>7437</td><th>1.89x</th><td>2521238</td><td>7926380</td><td>10447618</td><td>1044.7618</td><th>3.75x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>6160</td><th>1.57x</th><td>4805873</td><td>16620678</td><td>21426551</td><td>2142.6551</td><th>7.68x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>5247</td><th>1.34x</th><td>7873703</td><td>4984335</td><td>12858038</td><td>1285.8038</td><th>4.61x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>6241</td><th>1.59x</th><td>5154396</td><td>14627737</td><td>19782133</td><td>1978.2133</td><th>7.09x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>3930</td><th>1x</th><td>1280735</td><td>1508786</td><td>2789521</td><td>278.9521</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>5187</td><th>1.32x</th><td>2773779</td><td>3380017</td><td>6153796</td><td>615.3796</td><th>2.21x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing EmployeeTerritoryDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>5236</td><th>0x</th><td>1753577</td><td>6455579</td><td>8209156</td><td>820.9156</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>1912</td><th>0x</th><td>2617351</td><td>10705608</td><td>13322959</td><td>1332.2959</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>1969</td><th>0x</th><td>5458723</td><td>4998337</td><td>10457060</td><td>1045.706</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>2647</td><th>0x</th><td>5168201</td><td>11683355</td><td>16851556</td><td>1685.1556</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>980</td><th>0x</th><td>1202338</td><td>-1</td><td>1202337</td><td>120.2337</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>2157</td><th>0x</th><td>1497270</td><td>1947621</td><td>3444891</td><td>344.4891</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing OrderDetailDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>331678</td><th>0x</th><td>207553230</td><td>609161146</td><td>816714376</td><td>81671.4376</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>165567</td><th>0x</th><td>305011729</td><td>1098153012</td><td>1403164741</td><td>140316.4741</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>78378</td><th>0x</th><td>369403926</td><td>312661566</td><td>682065492</td><td>68206.5492</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>204384</td><th>0x</th><td>603072108</td><td>1292578844</td><td>1895650952</td><td>189565.0952</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>60253</td><th>0x</th><td>78186525</td><td>-1</td><td>78186524</td><td>7818.6524</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>169694</td><th>0x</th><td>252872808</td><td>276467280</td><td>529340088</td><td>52934.0088</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing OrderDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>400652</td><th>4.64x</th><td>225275403</td><td>635275506</td><td>860550909</td><td>86055.0909</td><th>5.62x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>302174</td><th>3.50x</th><td>514669297</td><td>1444711641</td><td>1959380938</td><td>195938.0938</td><th>12.79x</th></tr><tr class='best-size'><th class='c1'>Microsoft BinaryFormatter</th><td>86323</td><th>1x</th><td>566227974</td><td>235472415</td><td>801700389</td><td>80170.0389</td><th>5.23x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>302158</td><th>3.50x</th><td>520085788</td><td>1287961260</td><td>1808047048</td><td>180804.7048</td><th>11.80x</th></tr><tr class='best-time'><th class='c1'>ProtoBuf.net</th><td>90569</td><th>1.05x</th><td>68618850</td><td>84633129</td><td>153251979</td><td>15325.1979</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>212942</td><th>2.47x</th><td>251990148</td><td>236224376</td><td>488214524</td><td>48821.4524</td><th>3.19x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing ProductDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>25851</td><th>0x</th><td>9401909</td><td>40988409</td><td>50390318</td><td>5039.0318</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>15365</td><th>0x</th><td>13778536</td><td>71883060</td><td>85661596</td><td>8566.1596</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>6819</td><th>0x</th><td>21923163</td><td>20179721</td><td>42102884</td><td>4210.2884</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>15449</td><th>0x</th><td>19836524</td><td>73095619</td><td>92932143</td><td>9293.2143</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>4044</td><th>0x</th><td>2931844</td><td>-1</td><td>2931843</td><td>293.1843</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>13517</td><th>0x</th><td>7691476</td><td>12799802</td><td>20491278</td><td>2049.1278</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing RegionDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>485</td><th>0x</th><td>273684</td><td>772443</td><td>1046127</td><td>104.6127</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>159</td><th>0x</th><td>489246</td><td>1190416</td><td>1679662</td><td>167.9662</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>628</td><th>0x</th><td>1121536</td><td>1310790</td><td>2432326</td><td>243.2326</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>159</td><th>0x</th><td>367589</td><td>1121767</td><td>1489356</td><td>148.9356</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>54</td><th>0x</th><td>77864</td><td>-1</td><td>77863</td><td>7.7863</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>135</td><th>0x</th><td>156851</td><td>243643</td><td>400494</td><td>40.0494</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing ShipperDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>486</td><th>4.42x</th><td>280829</td><td>744317</td><td>1025146</td><td>102.5146</td><th>5.25x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>198</td><th>1.8x</th><td>479717</td><td>1318064</td><td>1797781</td><td>179.7781</td><th>9.21x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>700</td><th>6.36x</th><td>1147455</td><td>1365403</td><td>2512858</td><td>251.2858</td><th>12.88x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>198</td><th>1.8x</th><td>373560</td><td>1057679</td><td>1431239</td><td>143.1239</td><th>7.33x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>110</td><th>1x</th><td>93343</td><td>101807</td><td>195150</td><td>19.515</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>168</td><th>1.53x</th><td>168899</td><td>257649</td><td>426548</td><td>42.6548</td><th>2.19x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing SupplierDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>11521</td><th>2.79x</th><td>4619084</td><td>17499940</td><td>22119024</td><td>2211.9024</td><th>4.60x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>8253</td><th>2.00x</th><td>6019841</td><td>28296686</td><td>34316527</td><td>3431.6527</td><th>7.14x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>6032</td><th>1.46x</th><td>10161182</td><td>9383783</td><td>19544965</td><td>1954.4965</td><th>4.07x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>8238</td><th>1.99x</th><td>7653191</td><td>20037525</td><td>27690716</td><td>2769.0716</td><th>5.76x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>4135</td><th>1x</th><td>2199784</td><td>2603563</td><td>4803347</td><td>480.3347</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>6322</td><th>1.53x</th><td>2949040</td><td>4551363</td><td>7500403</td><td>750.0403</td><th>1.56x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing TerritoryDto 10,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>6459</td><th>5.64x</th><td>2405898</td><td>9366696</td><td>11772594</td><td>1177.2594</td><th>5.59x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>3319</td><th>2.90x</th><td>3500122</td><td>16839671</td><td>20339793</td><td>2033.9793</td><th>9.66x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>2846</td><th>2.49x</th><td>7163726</td><td>6728247</td><td>13891973</td><td>1389.1973</td><th>6.60x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>3319</td><th>2.90x</th><td>5151663</td><td>12699608</td><td>17851271</td><td>1785.1271</td><th>8.47x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>1145</td><th>1x</th><td>920907</td><td>1185461</td><td>2106368</td><td>210.6368</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>2789</td><th>2.44x</th><td>1352716</td><td>2264199</td><td>3616915</td><td>361.6915</td><th>1.72x</th></tr>
</tbody>
</table>
</body>
</html>

